
const express = require('express');
const router = express.Router();
const DBHelper = require('../utils/DBHelper');
const sql = require('../sqlMap');
var jsencrypt1 = require("../Encorypt/jsencrypt.js")
var jsencrypt = new jsencrypt1();
var md5 = require('md5-node')
const axios = require('axios')
//扑扑查询数据
router.get('/getPuPulist', (req, res) => {
	let sqlStr = sql.user.pupu;

	var parms = req.query
	console.log(parms)
	let conn = new DBHelper().getConn();
	conn.query(sqlStr, [], (err, result) => {
		if(result.length>0){
			res.json({
				'status': 200,
				'msg': '获取成功！',
				'data': result,
				})
		}
	})
	conn.end();
});
//扑扑查询数据
router.post('/getPuPulistLike', (req, res) => {
	let sqlStr = sql.user.pupulike;
	let params = req.body;
	let conn = new DBHelper().getConn();
	conn.query(sqlStr, [params.text], (err, result) => {
		console.log(result)
		if(result.length>0){
			res.json({
				'status': 200,
				'msg': '获取成功！',
				'data': result,
				})
				
		}
	})
	conn.end();
});